﻿CREATE PROCEDURE [dbo].[DataFileLogInsert]
(
	@DatabaseFileLogSetId	uniqueidentifier,
	@InstanceName			nvarchar(50),
	@DatabaseName			nvarchar(255),
	@GroupId				int,
	@FileId					int,
	@FileGuid				uniqueidentifier,
	@FileTypeDesc			nvarchar(50),
	@FileName				nvarchar(255),
	@FilePath				nvarchar(255),
	@SizeInMb				bigint,
	@MaxSizeInMb			bigint,
	@GrowthInPercent		int,
	@GrowthInMb				bigint,
	@OwnerSid				nvarchar(50),
	@CreateDate				datetime,
	@CompatibilityLevel		int,
	@CollationName			nvarchar(255),
	@UserAccessDesc			nvarchar(255),
	@IsReadOnly				int,
	@IsAutoCloseOn			int,
	@IsAutoShrinkOn			int,
	@StateDesc				nvarchar(255),
	@RecoveryModelDesc		nvarchar(255)
)
AS
BEGIN
INSERT INTO [dbo].[DataFileLog] (
			[DatabaseFileLogSetId],
			[InstanceName],
			[DatabaseName],
			[GroupId],
			[FileId],
			[FileGuid],
			[FileTypeDesc],
			[FileName],
			[FilePath],
			[SizeInMb],
			[MaxSizeInMb],
			[GrowthInPercent],
			[GrowthInMb],
			[OwnerSid],
			[CreateDate],
			[CompatibilityLevel],
			[CollationName],
			[UserAccessDesc],
			[IsReadOnly],
			[IsAutoCloseOn],
			[IsAutoShrinkOn],
			[StateDesc],
			[RecoveryModelDesc],
			[LastModifiedDate]
) 
VALUES  
( 
	@DatabaseFileLogSetId,
	@InstanceName,
	@DatabaseName,
	@GroupId,
	@FileId,
	@FileGuid,
	@FileTypeDesc,
	@FileName,
	@FilePath,
	@SizeInMb,
	@MaxSizeInMb,
	@GrowthInPercent,
	@GrowthInMb,
	@OwnerSid,
	@CreateDate,
	@CompatibilityLevel,
	@CollationName,
	@UserAccessDesc,
	@IsReadOnly,
	@IsAutoCloseOn,
	@IsAutoShrinkOn,
	@StateDesc,
	@RecoveryModelDesc,
	GETDATE()
);
RETURN 0
END